package com.xy.logger;

import java.util.TimerTask;

import org.slf4j.LoggerFactory;

public class ScheduledPrinter extends TimerTask {
	private org.slf4j.Logger	logger		= LoggerFactory.getLogger(this.getClass());
	private static int			printCount	= 1;
	
	@Override
	public void run() {
		logger.debug("------------------------" + printCount + "--------------------------");
		logger.debug("debug a line");
		logger.info("info a line");
		logger.warn("warn a line");
		logger.error("error a line", new Exception("It is a test exception"));
		logger.debug("------------------------" + printCount + "--------------------------");
		printCount++;
	}
	
}
